{% extends "base.html" %}

{% block title %}编辑IP配置{% endblock %}

{% block header %}编辑IP配置{% endblock %}

{% block content %}
{% if error %}
<script>
    window.onload = function() {
        alert('{{ error }}');
    };
</script>
{% endif %}
    <div class="container">
        <form method="POST" action="{{ url_for('edit_ip', id=ip[0]) }}">
            <div class="form-group">
                <label for="line">线别</label>
                <input type="text" class="form-control" id="line" name="line" value="{{ ip[1] }}" required>
            </div>
            <div class="form-group">
                <label for="address">IP地址</label>
                <input type="text" class="form-control" id="address" name="address" value="{{ ip[2] }}" required>
            </div>
            <div class="form-group">
                <label for="software">测试软件</label>
                <input type="text" class="form-control" id="software" name="software" value="{{ ip[3] }}" required>
            </div>
            <div class="form-group">
                <label for="product_type">产品类型</label>
                <input type="text" class="form-control" id="product_type" name="product_type" value="{{ ip[4] }}" required>
            </div>
            <button type="submit" class="btn btn-primary">保存</button>
            <button type="button" class="btn btn-secondary" onclick="window.history.back()">取消</button>
        </form>
    </div>
{% endblock %}